pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    if threshold <= 1 {
        return 0;
    }
    let len = threshold as usize + 2;
    let mut cache = vec![0; len];
    cache[1] = 1;
    cache[2] = 1;
    let mut ans = 1;
    for i in 2..len {
        cache[i] = cache[i - 2] + cache[i - 1];
        if cache[i] >= threshold {
            break;
        }
        if cache[i] % 2 == 1 {
            ans += cache[i];
        }
    }
    return ans;
}
